package com.otitan.la.forest.industry.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.otitan.la.forest.industry.dto.OutputStatisticalDTO;
import com.otitan.la.forest.industry.dto.ProductStatisticalDTO;
import com.otitan.la.forest.industry.entity.AuditRecordsEntity;
import com.otitan.la.forest.industry.entity.OutputStatisticalEntity;
import com.otitan.webapp.framework.basepro.model.DataResult;
import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 林业产业产值统计表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-10-14 16:18:19
 */
public interface OutputStatisticalService extends IService<OutputStatisticalEntity> {
    /**
     * 新增
     * @return
     */
    DataResult add(OutputStatisticalEntity outputStatistical, BindingResult bindingResult);

    /**
     * 批量删除
     * @return
     */
    DataResult batchDelete(List<String> ids);

    /**
     * 修改
     * @return
     */
    DataResult editor(OutputStatisticalEntity outputStatistical, BindingResult bindingResult);

    /**
     * 列表查询（分页）
     * @return
     */
    DataResult findPageData(long page, long size, OutputStatisticalDTO outputStatistical);

    /**
     * 根据ID查询
     * @return
     */
    DataResult findOne(String id);

    /**
     * 审核
     * @author jiachangsen
     * @param [entity, bindingResult]
     * @return com.otitan.webapp.framework.basepro.model.DataResult
     * @exception
     * @date 2020/10/22 11:42
     */
    DataResult check(AuditRecordsEntity entity, BindingResult bindingResult);

    /**
     * @Description:    导出
     * @Author:        wangqingsong
     * @exception          [outputStatisticalDTO, httpServletResponse]
     * @return             void
     * @CreateDate:     2020/10/17 18:02
     */
    void exportZip(OutputStatisticalDTO outputStatisticalDTO, HttpServletResponse httpServletResponse);


    /**
     * @Description:    统计
     * @Author:        xiazw
     * @exception          [outputStatisticalDTO, httpServletResponse]
     * @return
     * @CreateDate:     2020/10/17 18:02
     */
    DataResult<Map<String,Object>> statistical(ProductStatisticalDTO productStatisticalDTO);


    /**
     * @Description:    导入
     * @Author:        wangqingsong
     * @exception          [file]
     * @return             com.otitan.webapp.framework.basepro.model.DataResult
     * @CreateDate:     2020/10/20 15:48
     */
    DataResult importFile(MultipartFile file) throws IOException;
}

